
#ifndef __TAL_FW_SECURITY__
#define __TAL_FW_SECURITY__


#ifdef __cplusplus
    extern "C" {
#endif

#include "tuya_cloud_types.h"

typedef struct {
    UINT_T dead_time;
    BOOL_T security_mode_flag;
    BOOL_T signature_verification_ok;
} TUYA_SECURITY_T;


INT_T tal_security_init(VOID_T);
TUYA_SECURITY_T *tal_security_info_get(VOID_T);

BOOL_T tal_ecc_sign_verify(VOID_T);
BOOL_T tal_ecc_sign_verify_with_sign(UINT8_T *sign_hex, UINT8_T len);

BOOL_T tal_mbedtls_sha256(const UCHAR_T *input, UINT32_T len, UCHAR_T output[32], BOOL_T is224);

#ifdef __cplusplus
}
#endif

#endif

